-
Notifications
You must be signed in to change notification settings - Fork 4
fix: search #341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: search #341
Conversation
Caution Review failedThe pull request is closed. WalkthroughAdds pagination, filtering, and sorting to user search; makes search case-insensitive using ILIKE and fuzzy variants; adds parallel total-count retrieval; introduces public endpoints for search suggestions and popular searches; updates routing to expose these endpoints without auth. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Client
participant API as Express Router
participant UC as UserController
participant US as UserService
participant DB as DB
Client->>API: GET /api/users/search?q=&page=&limit=&verified=&sort=
API->>UC: search(req, res)
UC->>US: searchUsers(q, page, limit, verifiedOnly, sortBy)
par Fetch users
US->>DB: ILIKE/fuzzy query, filters, sort, pagination
DB-->>US: users[]
and Count total
UC->>US: getSearchUsersCount(q, verifiedOnly)
US->>DB: COUNT with same filters
DB-->>US: total
end
US-->>UC: users[]
UC-->>Client: { users, total, totalPages, hasNextPage, hasPrevPage, searchInfo }
sequenceDiagram
autonumber
actor Client
participant API as Express Router
participant UC as UserController
participant US as UserService
participant DB as DB
Client->>API: GET /api/users/suggestions?q=&limit=
API->>UC: getSearchSuggestions
UC->>US: getSearchSuggestions(q, limit)
US->>DB: ILIKE partial match (lightweight fields)
DB-->>US: suggestions[]
US-->>UC: suggestions[]
UC-->>Client: { suggestions }
Client->>API: GET /api/users/popular?limit=
API->>UC: getPopularSearches
UC->>US: getPopularSearches(limit)
US->>DB: query verified, non-archived, ordered by popularity
DB-->>US: popular[]
US-->>UC: popular[]
UC-->>Client: { popular }
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Assessment against linked issues
Assessment against linked issues: Out-of-scope changes
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (3)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Description of change
Makes search case insensitive
Issue Number
closes #340
Type of change
How the change has been tested
Change checklist
Summary by CodeRabbit